import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

export default new Vuex.Store({
    state: {
      shopCar: localStorage.getItem('shop_car') ? localStorage.getItem('shop_car') : [],
      skuShow:false
    },
    mutations: {
        changeShopCar(state,newGoods){
            state.shopCar.push(newGoods)
        },
        changeSkuShow(state,val){
           state.skuShow=val
        }
    }
})

